home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 14 / CU Amiga Magazine's Super CD-ROM 14 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-09].iso / CUCD / Programming / Mesa-2.2 / src / light.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-03-13  |  3.8 KB  |  118 lines

  1. /* $Id: light.h,v 1.3 1996/12/18 20:03:01 brianp Exp $ */
  2.  
  3. /*
  4.  * Mesa 3-D graphics library
  5.  * Version:  2.1
  6.  * Copyright (C) 1995-1996  Brian Paul
  7.  *
  8.  * This library is free software; you can redistribute it and/or
  9.  * modify it under the terms of the GNU Library General Public
  10.  * License as published by the Free Software Foundation; either
  11.  * version 2 of the License, or (at your option) any later version.
  12.  *
  13.  * This library is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.  * Library General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU Library General Public
  19.  * License along with this library; if not, write to the Free
  20.  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23.  
  24. /*
  25.  * $Log: light.h,v $
  26.  * Revision 1.3  1996/12/18 20:03:01  brianp
  27.  * gl_set_material() now takes a bitmask instead of face and pname
  28.  * added gl_material_bitmask()
  29.  *
  30.  * Revision 1.2  1996/12/07 10:21:58  brianp
  31.  * added gl_set_material()
  32.  *
  33.  * Revision 1.1  1996/09/13 01:38:16  brianp
  34.  * Initial revision
  35.  *
  36.  */
  37.  
  38.  
  39. #ifndef LIGHT_H
  40. #define LIGHT_H
  41.  
  42.  
  43. #include "types.h"
  44.  
  45.  
  46. extern void gl_ShadeModel( GLcontext *ctx, GLenum mode );
  47.  
  48. extern void gl_ColorMaterial( GLcontext *ctx, GLenum face, GLenum mode );
  49.  
  50. extern void gl_Lightfv( GLcontext *ctx,
  51.                         GLenum light, GLenum pname, const GLfloat *params,
  52.                         GLint nparams );
  53.  
  54. extern void gl_LightModelfv( GLcontext *ctx,
  55.                              GLenum pname, const GLfloat *params );
  56.  
  57.  
  58. extern GLuint gl_material_bitmask( GLenum face, GLenum pname );
  59.  
  60. extern void gl_set_material( GLcontext *ctx, GLuint bitmask,
  61.                              const GLfloat *params);
  62.  
  63. extern void gl_Materialfv( GLcontext *ctx,
  64.                            GLenum face, GLenum pname, const GLfloat *params );
  65.  
  66.  
  67.  
  68. extern void gl_GetLightfv( GLcontext *ctx,
  69.                            GLenum light, GLenum pname, GLfloat *params );
  70.  
  71. extern void gl_GetLightiv( GLcontext *ctx,
  72.                            GLenum light, GLenum pname, GLint *params );
  73.  
  74.  
  75. extern void gl_GetMaterialfv( GLcontext *ctx,
  76.                               GLenum face, GLenum pname, GLfloat *params );
  77.  
  78. extern void gl_GetMaterialiv( GLcontext *ctx,
  79.                               GLenum face, GLenum pname, GLint *params );
  80.  
  81.  
  82. extern void gl_compute_spot_exp_table( struct gl_light *l );
  83.  
  84. extern void gl_compute_material_shine_table( struct gl_material *m );
  85.  
  86. extern void gl_update_lighting( GLcontext *ctx );
  87.  
  88.  
  89.  
  90. extern void gl_color_shade_vertices( GLcontext *ctx,
  91.                                      GLuint n,
  92.                                      GLfloat vertex[][4],
  93.                                      GLfloat normal[][3],
  94.                                      GLuint twoside,
  95.                                      GLfixed frontcolor[][4],
  96.                                      GLfixed backcolor[][4] );
  97.  
  98.  
  99. extern void gl_color_shade_vertices_fast( GLcontext *ctx,
  100.                                           GLuint n,
  101.                                           GLfloat vertex[][4],
  102.                                           GLfloat normal[][3],
  103.                                           GLuint twoside,
  104.                                           GLfixed frontcolor[][4],
  105.                                           GLfixed backcolor[][4] );
  106.  
  107.  
  108. extern void gl_index_shade_vertices( GLcontext *ctx,
  109.                                      GLuint n,
  110.                                      GLfloat vertex[][4],
  111.                                      GLfloat normal[][3],
  112.                                      GLuint twoside,
  113.                                      GLuint frontindex[],
  114.                                      GLuint backindex[] );
  115.  
  116. #endif
  117.  
  118.